package com.uex.dev.manage.admin.po;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.uex.dev.manage.admin.enums.DeviceTypeEnum;
import com.uex.dev.manage.admin.typehandler.ListStringTypeHandler;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author wangchao
 * @since 2024-02-22
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName(value = "t_device", autoResultMap = true)
public class DevicePO extends Model<DevicePO> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private String deviceToken;

    private Integer devicePrjid;

    private DeviceTypeEnum deviceType;

    @TableField(typeHandler = ListStringTypeHandler.class)
    private List<String> deviceHisToken;

    private String deviceModel;

    private Integer deviceModelid;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime deviceMaintainTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime deviceCreateTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime deviceActiveTime;

    @TableLogic
    private Byte deleted;

    @Override
    public Serializable pkVal() {
        return this.id;
    }
}
